<template>
<!--  新审批卡片-->

	<view v-if="history=='0' && type=='card'" class="_status_tag" :class=" (status == '0' || status == '1') ? 'befor':status == '-1' ? 'back': '' ">
		{{ status == '0' ? '待审批' : status == '1' ? '审批中' : status == '2' ? '通过' : '不通过' }}
	</view>


  <!--  老审批卡片-->
  <view  v-if="history=='1' && type=='card'" class="_status_tag" :class="status == '1' ? '': 'back'">
    {{ status == '1' ? '通过' : '不通过' }}
  </view>


  <!--  新审批详情   0待审批  1审批通过  2不通过驳回-->
  <view  v-if="history=='0' && type=='info'"  class="_status_tag" :class=" status == '0' ? 'befor':status == '1' ? '': 'back' ">
    {{ status == '0' ? '待审批' : status == '1' ? '通过' :'不通过' }}
  </view>


  <!--  老审批详情   1同意并完成  2同意并加签  3不通过驳回 -->
  <view  v-if="history=='1' && type=='info'"  class="_status_tag" :class=" (status == '1'|| status == '2' ) ? '':status == null?'jiaqian': 'back' ">
    {{ (status == '1'|| status == '2')  ? '同意' :status == null?'加签': '不通过' }}
  </view>

<!--  <view class="_status_tag" :class=" (status == '0' || status == '1') ? 'befor':status == '3' ? 'back': '' ">-->
<!--    {{ status == '0' ? '待审批' : status == '1' ? '审批中' : status == '2' ? '通过' : '不通过' }}-->
<!--  </view>-->
</template>

<script setup>
	const props = defineProps({
		status: String,
    type:String,
    history:String

	})
  // setTimeout(()=>{
  //   console.log('????????')
  //   console.log(props)
  //
  // },1000)
</script>

<style lang="scss" scoped>
	._status_tag {
		width: max-content;
		background: rgba(22, 119, 255, 0.1);
		border-radius: 4rpx;
		padding: 6rpx 8rpx;
		font-weight: 500;
		font-size: 20rpx;
		color: #1677FF;
		line-height: 20rpx;
	}

	.befor {
		background: #FFF4D1 !important;
		color: #F27900 !important;
	}
  .jiaqian {
    background: rgba(108, 108, 108, 0.13) !important;
    color: rgba(52, 52, 52, 0.49) !important;
  }

  .back {
    background: rgba(255, 5, 27, 0.18) !important;
    color: rgba(253, 12, 48, 0.98) !important;
  }
</style>